//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
public class Main {
    public static void main(String[] args) {
        double a=1,b=0,sum=0,t=1;
        for(double i=a;i<=100;i++){
            b=1/i;
            sum+=b*t;
            t=-t;
        }
        System.out.println(sum);
    }
}